/**
 * 本文件简单演示封装针对不同功能模块需要与后端交互的接口调用方法封装
 */
import axios from "@/utils/axios";
import* as baseURL from "@/api/url";

// 获取户口信息
export const getPopulationPage=(params)=> {
    return axios({
        url: baseURL.population_page_url,
        method: "get",
        params
    });
}
//按个人id查询个人信息
export const getPopulationByhouseholdNumber=(params)=> {
    return axios({
        url: baseURL.population_searchbyid_url,
        method: "get",
        params
    });
}
//按个人身份证号查询个人信息
export const getPopulationByIdNumber=(params)=> {
    return axios({
        url: baseURL.population_searchbyidnumber_url,
        method: "get",
        params
    });
}
// 更新户口信息
export function updatePopulation(data) {
    return axios({
        url: baseURL.population_edit_url,
        method: "put",
        data
    });
}
// 删除户口信息
export function deletePopulation(personId) {
    return axios({
        url: baseURL.population_delete_url,
        method: "delete",
        params: { personId }
    });
}
// 添加户口信息
export function addPopulation(data) {
    return axios({
        url: baseURL.population_add_url,
        method: "post",
        data
    });
}